FUNCTION experimentation with pseudo-event driven mouse events
ST-VERSIONS 4.1
PREREQUISITES
CONFLICTS
DISTRIBUTION world
VERSION 1.0
DATE October 1992
SUMMARY This file contains the results of some experimentation with mouse events. Specifically, simulating events from the polling loop. To do so, it introduces a few new classes, and comes with examples. Not meant to real use, but gives an indication of where to start hacking :~). BH, 7/5/93"!
'I am a specialisation of WidgetController. I pretend to be event-driven. The events I send
are:
#enter
#leave
#wentDown
#wentUp
#click
#doubleClick
#stillDown
To get them sent to a model (such as a MultiPluggableAdaptor -- see this class category) initialize me using the <beMultiple> message. It''s possibly inadvisable to use me with an
ordinary PluggableAdaptor since I assume that its block arguments are the <sensor> and the
<event> (instead of the <point> and the <event>); although the standard initialization alogrithms that
are available in class PluggableAdaptor never use the <point>.
The main method I override is controlLoopBody. Another important method is isControlActive, I no
longer give up control if the red buttonis pressed.
Class Variables:
DoubleClickTime (400).
StillDownTime (100).
Used as a test to detemine when to recognise a double click or a stillDown.
Try the example. On some machines, you may have to change the double click time because of the
time it takes to write to the Transcript, otherwise take out the bit that writes to the Transcript.